package com.youku.plugins.endcardV4New.model.data
{
   public class PlayerSizeData extends Object
   {
      
      public function PlayerSizeData(param1:PrivateClass) {
         super();
      }
      
      private static var _instance:PlayerSizeData;
      
      public static function getInstance() : PlayerSizeData {
         if(_instance == null)
         {
            _instance = new PlayerSizeData(new PrivateClass());
         }
         return _instance as PlayerSizeData;
      }
      
      private var _data:Object;
      
      private var _width:Number;
      
      private var _height:Number;
      
      private var _cHeight:Number;
      
      private var _isFullScreen:Boolean;
      
      private var _winType:String;
      
      private var _playerType:String;
      
      public function set data(param1:Object) : void {
         this._data = param1;
      }
      
      public function get width() : Number {
         return this._data.width;
      }
      
      public function get height() : Number {
         return this._data.height;
      }
      
      public function get cHeight() : Number {
         return this._data.cheight;
      }
      
      public function get isFullScreen() : Boolean {
         return this._data.fullscreen;
      }
      
      public function get winType() : String {
         return this._winType;
      }
      
      public function set winType(param1:String) : void {
         this._winType = param1;
      }
      
      public function get layoutType() : String {
         var _loc1_:* = "1";
         if(this._data.width >= 860)
         {
            _loc1_ = "2";
         }
         else if(this._data.height / this._data.width <= 524 / 860)
         {
            _loc1_ = "2";
         }
         else
         {
            _loc1_ = "1";
         }
         
         return _loc1_;
      }
      
      public function get rowNum() : int {
         var _loc1_:Number = this._data.height;
         if(this.isFullScreen)
         {
            _loc1_ = this._data.height;
         }
         else if(this.winType == "exterior")
         {
            _loc1_ = this._data.height - this._data.cheight - 32;
         }
         else
         {
            _loc1_ = this._data.height - this._data.cheight;
         }
         
         if(_loc1_ >= 640)
         {
            return 4;
         }
         if(_loc1_ >= 430 && _loc1_ < 640)
         {
            return 3;
         }
         return 2;
      }
      
      public function get columnNum() : int {
         if(this._data.width >= 1155)
         {
            return 5;
         }
         if(this._data.width >= 860 && this._data.width < 1155)
         {
            return 4;
         }
         if(this._data.width >= 640 && this._data.width < 860)
         {
            return 3;
         }
         if(this._data.width >= 430 && this._data.width < 640)
         {
            return 2;
         }
         return 2;
      }
      
      public function get scale() : Number {
         var _loc1_:Number = 1;
         var _loc2_:Number = 1;
         var _loc3_:Number = this._data.height;
         if(this.isFullScreen)
         {
            _loc3_ = this._data.height;
         }
         else if(this.winType == "exterior")
         {
            _loc3_ = this._data.height - this._data.cheight - 32;
         }
         else
         {
            _loc3_ = this._data.height - this._data.cheight;
         }
         
         var _loc4_:Number = this._data.width;
         if(_loc3_ >= 740)
         {
            _loc2_ = _loc3_ / 740;
         }
         else if(_loc3_ >= 530 && _loc3_ < 640)
         {
            _loc2_ = _loc3_ / 530;
         }
         else if(_loc3_ >= 300 && _loc3_ < 430)
         {
            _loc2_ = _loc3_ / 300;
         }
         else if(_loc3_ < 300)
         {
            _loc2_ = _loc3_ / 300;
         }
         
         
         
         if(_loc4_ >= 1200)
         {
            _loc1_ = _loc4_ / 1200;
         }
         else if(_loc4_ >= 960 && _loc4_ < 1155)
         {
            _loc1_ = _loc4_ / 960;
         }
         else if(_loc4_ >= 700 && _loc4_ < 860)
         {
            _loc1_ = _loc4_ / 700;
         }
         else if(_loc4_ >= 500 && _loc4_ < 640)
         {
            _loc1_ = _loc4_ / 500;
         }
         else if(_loc4_ < 430)
         {
            _loc1_ = _loc4_ / 430;
         }
         
         
         
         
         return _loc1_ < _loc2_?_loc1_:_loc2_;
      }
      
      public function get playerType() : String {
         return this._playerType;
      }
      
      public function set playerType(param1:String) : void {
         this._playerType = param1;
      }
   }
}
class PrivateClass extends Object
{
   
   function PrivateClass() {
      super();
   }
}
